$file=$ARGV[0];
chomp($file);
$out=$ARGV[1];
chomp($out);
$ambi=$ARGV[2];
chomp($ambi);
open(BUFF,"gunzip -c $file|") or die " no fie found $file\n";
open(WRBUFF,"|gzip > $out") or die " not able to write $out\n";
open(AMBI,"|gzip > $ambi") or die " not able to write $ambi\n";
while(<BUFF>)
{
	chomp($_);
	@array=split(" ",$_);
	$temp="$array[3] $array[4]";
	if($temp eq "A T" || $temp eq "T A" || $temp eq "G C" || $temp eq "C G")
	{
		print AMBI $_."\n";	
	} 
	else
	{
		print WRBUFF $_."\n"
	}
}
